import request from '@/utils/request'

// 获取用户列表
export function getUserListApi() {
  return request({ url: '/user', method: 'get' })
}

// 添加用户
export function addUserApi(data) {
  return request({ url: '/user', method: 'post', data })
}

// 更新用户
export function updateUserApi(id, data) {
  return request({ url: `/user/${id}`, method: 'put', data })
}

// 删除用户
export function deleteUserApi(id) {
  return request({ url: `/user/${id}`, method: 'delete' })
}
